﻿using System;

namespace Picnic.Spec
{
	/// <summary>
	/// Represents a result of statement scope validation.
	/// </summary>
	public class StatementScopeValidationResult
	{
		private readonly TimeSpan _elapsed;
		private readonly int _satisfiedStatementCount;
		private readonly int _passedStatementCount;
		private readonly int _failedStatementCount;

		/// <summary>
		/// Initializes a new instance of the <see cref="StatementScopeValidationResult"/> class.
		/// </summary>
		public StatementScopeValidationResult(
			TimeSpan elapsed,
			int satisfiedStatementCount,
			int passedStatementCount,
			int failedStatementCount)
		{
			_elapsed = elapsed;
			_satisfiedStatementCount = satisfiedStatementCount;
			_passedStatementCount = passedStatementCount;
			_failedStatementCount = failedStatementCount;
		}

		/// <summary>
		/// Gets a time which was elapsed for validate scope of statements.
		/// </summary>
		public TimeSpan Elapsed
		{
			get { return _elapsed; }
		}

		/// <summary>
		/// Gets a count of satisfied statements in scope.
		/// </summary>
		public int SatisfiedStatementCount
		{
			get { return _satisfiedStatementCount; }
		}

		/// <summary>
		/// Gets a count of passed statements in scope.
		/// </summary>
		public int PassedStatementCount
		{
			get { return _passedStatementCount; }
		}

		/// <summary>
		/// Gets a count of failed statements in scope.
		/// </summary>
		public int FailedStatementCount
		{
			get { return _failedStatementCount; }
		}
	}

}